<?php

$siteId = "";
$titleId = "";
$atriName = "";
$section = "";

if(@$_GET['siteid'])
	$siteId = $_GET['siteid'];

if(@$_GET['atrid'])
	$titleId = $_GET['atrid'];

if(@$_GET['atrname'])
	$atriName = $_GET['atrname'];
	
if(@$_GET['xmlsection'])
	$section = $_GET['xmlsection'];

	
$obTagTitle = $XML1 -> getSiteChildrenByName($siteId,"title");

$currentTitleContent = $obTagTitle -> GetAttributeByKey($atriName);

$currentTitleParameters = $obTagTitle -> GetAttibuteParameterByKey($atriName);


$EnglishID = getEnglishID($titleId.$atriName);

$enSql = "select at_value from ".$PROJECT_DB_TABLES["atri"]." WHERE at_id='".$EnglishID."'";

$enResult = getRecord($enSql);

addContent("<div style=\"background-color:#FFFFFF;\">");

if(count($enResult) >0 ){
	
	addContent("ENGLISH Version<br/><textarea  readonly = \"readonly\" cols=\"80\">".$enResult[0]['at_value']."</textarea><br/>");//English version
}

addContent("Title  Editor<br/>");

addContent("<textarea cols=\"80\" id='taTitleEditor' rows=\"10\">".$currentTitleContent."</textarea><br/>");//title editor

addContent("Comment<br/>");

addContent("<textarea cols=\"80\" id=\"taPreviousTitleComment\" rows=\"10\" readonly=\"readonly\">".$currentTitleParameters['at_comment']."</textarea><br/>"); //Comment 

addContent("<textarea cols=\"80\" rows=\"10\" id=\"taTitleComment\"></textarea><br/>"); //Comment 

addContent("<a href=\"javascript:void(0)\" onclick=\"onclick_saveTitleEditor('".$siteId."','".$titleId."','".$section."')\">save</a>&nbsp;<a href=\"javascript:Popup.hide('modal');\">close</a>");

addContent("</div>");

////addContent("<textarea cols=\"80\" id='taTitleEditor' rows=\"10\"></textarea><br/>);
//
//
//

?>